<?php

class Formatacao{
	
	public static function converteDataBrasilSql($data){
		
		list($dia, $mes, $ano) = explode('/', $data);

		return date('Y-m-d', mktime(0, 0, 0, $mes, $dia, $ano));
	}
	
	public static function converteDataSqlBrasil($data){
		
		list($ano, $mes, $dia) = explode('-', $data);

		return date('d/m/Y', mktime(0, 0, 0, $mes, $dia, $ano));
	}
}